﻿{extend name="iframe" /}
{block name="css"}
<link rel="stylesheet" href="__AD__/module/admin.css?v=316">
<link rel="stylesheet" href="__AD_CSS__/theme.css">
{/block}
{block name="body"}
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin admin-nav-mini">
    <!-- 头部 -->
    <div class="layui-header">
        <div class="layui-logo">
            <img src='{$config.logo|default="__AD_IMG__/logo.png"}'/>
            <cite>{$config.sitename|default=$Think.lang.Title}</cite>
        </div>
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <!-- 天气信息 -->
            <li class="layui-nav-item layui-hide-xs" lay-unselect id="weather-widget"></li>
            <li class="layui-nav-item" lay-unselect>
                <a href="/" target="_blank" title="网站首页">
                    <i class="layui-icon layui-icon-website"></i>  
                    <cite class="layui-hide-xs">网站首页</cite>
                </a>
            </li>
            <li class="layui-nav-item" lay-unselect>
                <a class="ajax-status" data-url="{:url('clear')}" title="清空缓存">
                    <i class="layui-icon layui-icon-unlink"></i> 
                    <cite class="layui-hide-xs">清空缓存</cite>
                </a>
            </li>
            <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="fullScreen" title="全屏"><i class="layui-icon layui-icon-screen-full"></i> 全屏显示</a>
            </li>-->
            <li class="layui-nav-item" lay-unselect style="margin-right: 25px;">
                <a>
                    <i class="layui-icon layui-icon-username"></i>
                    <cite class="layui-hide-xs">{$info.nick_name|default=$Think.lang.author}</cite>
                </a>
                <dl class="layui-nav-child">
                    <dd lay-unselect>
                        <a class="open-popup" data-title="修改密码" data-size="450,400" data-url="{:url('myPass')}">修改密码</a>
                    </dd>
                    <hr>
                    <dd lay-unselect>
                        <a class="open-popup" data-title="个人信息" data-size="680,464" data-url="{:url('myInfo')}">个人信息</a>
                    </dd>
                    <hr>
                    <dd lay-unselect>
                        <a ew-event="logout" data-url="{:url('logout')}">退出</a>
                    </dd>
                </dl>
            </li>
            <!--<li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a>
            </li>
            <li class="layui-nav-item layui-hide-xs" lay-unselect>
                <a ew-event="message" title="消息"><i class="layui-icon layui-icon-notice"></i></a>
            </li>-->
            <li class="layui-nav-item" lay-unselect>
                <a ew-event="theme" title="主题"><i class="layui-icon layui-icon-more-vertical"></i></a>
            </li>
        </ul>
    </div>

    <!-- 侧边栏 -->
    <div class="layui-side">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree arrow2" lay-filter="admin-side-nav" lay-accordion="true">
                <li data-name="home" class="layui-nav-item layui-this">
                    <a href="javascript:;" lay-href="{:url('main')}" class="layui-this">
                        <i class="layui-icon layui-icon-home"></i>
                        <cite>系统首页</cite>
                    </a>
                </li>
                {volist name="navbar" id="v"}
                <li class="layui-nav-item">
                    <a {if isset($v.children)}href="javascript:;"{else}lay-href="{:url($v.url)}"{/if}><i class="layui-icon {$v.icon}"></i>&emsp;<cite>{$v.name}</cite></a>
                    {if isset($v.children)}
                    <dl class="layui-nav-child">
                        {volist name="v.children" id="n1"}
                        <dd>
                            <a {if isset($n1.children)}href="javascript:;"{else}lay-href="{:url($n1.url)}"{/if}>&emsp;{$n1.name}</a>
                            {if isset($n1.children)}
                            <dl class="layui-nav-child">
                                {volist name="n1.children" id="n2"}
                                <dd><a lay-href="{:url($n2.url)}">{$n2.name}</a></dd>
                                {/volist}
                            </dl>
                            {/if}
                        </dd>
                        {/volist}
                    </dl>
                    {/if}
                </li>
                {/volist}
                <!-- 大屏幕为开放式 -->
                <li class="layui-nav-item">
                    <a href="/myadmin/datascreen.html" target="_blank"><i class="layui-icon layui-icon-senior"></i>&emsp;<cite>监控大屏</cite></a>
                </li>
            </ul>
        </div>
    </div>

    <!-- 主体部分 -->
    <div class="layui-body"></div>
    <!-- 底部 -->
    <div class="layui-footer">
        copyright © {$Think.now|date='Y'} <a href="http://www.qcwd.com" target="_blank">{$config.copyright|default=$Think.lang.Copyright}</a> all rights reserved.
        <span class="pull-right">Version  {$Think.PHP_VERSION}</span>
    </div>
</div>

<!-- 加载动画 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>
{/block}
{block name="js"}
<!-- js部分 -->
<script type="text/javascript">
layui.config({
    version: '317',
    base: '__AD_MOD__/'
}).use(['layer', 'admin', 'index'], function () {
    var $ = layui.jquery;
    var index = layui.index;
    var admin = layui.admin;
    // 默认加载主页
    index.loadHome({
        menuPath: '{:url("main")}',
        menuName: '<i class="layui-icon layui-icon-home"> </i>'
    });
    //首次登陆
    if ({$info.login_count|default=0}<1) {
        layer.open({
            type: 2 
            ,title: '首次登陆，修改密码'
            ,maxmin: true
            ,area: ['450px', '400px']
            ,content: '{:url("myPass")}'
        });
    }
    // 移除loading动画
    setTimeout(function () {
        admin.removeLoading();
    }, window === top ? 300 : 0);
});
// 天气
(function(a, h, g, f, e, d, c, b) {
    b = function() {
        d = h.createElement(g);
        c = h.getElementsByTagName(g)[0];
        d.src = e;
        d.charset = "utf-8";
        d.async = 1;
        c.parentNode.insertBefore(d, c)
    };
    a["SeniverseWeatherWidgetObject"] = f;
    a[f] || (a[f] = function() {
        (a[f].q = a[f].q || []).push(arguments)
    });
    a[f].l = +new Date();
    if (a.attachEvent) {
        a.attachEvent("onload", b)
    } else {
        a.addEventListener("load", b, false)
    }
}(window, document, "script", "tpwidget", "//cdn.sencdn.com/widget2/static/js/bundle.js?t=" + parseInt((new Date().getTime() / 100000000).toString(), 10)));
window.tpwidget('show', {
    "flavor": "slim",
    "location": "WX4FBXXFKE4F",
    "geolocation": "enabled",
    "language": "zh-Hans",
    "unit": "c",
    "theme": "chameleon",
    "container": "weather-widget",
    "bubble": "enabled",
    "alarmType": "badge",
    "token": "1e6892b2-5304-48db-813e-3d882d6efad6",
    "uid": "UB6953924F",
    "hash": "ce68b5b7b447ec5bda327f8c9c2d59f9"
});
</script>
{/block}